package com.example.demo.ws;

import com.example.demo.pojo.dto.add.StudentAddDto;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;

/**
 * webservice服务接口测试.参考自：https://www.jianshu.com/p/354522360e21
 *
 * @author TongDaShuai
 * @since 2021/10/27
 */
@WebService(
        // 暴露的服务名称
        name = "testWebService",
        // 命名空间，一般是接口的包名倒序
        targetNamespace = "http://webservice.tds.com/"
)
public interface TestWebService {

    /**
     * 暴露的服务方法sayHello
     * @param name
     * @return
     */
    @WebMethod
    @WebResult(name = "String", targetNamespace = "")
    String sayHello(@WebParam(name = "username") String name);

    /**
     * 暴露的服务方法saveUser
     * @param student
     * @return
     */
    @WebMethod
    @WebResult(name = "String", targetNamespace = "")
    String saveUser(@WebParam(name = "student", targetNamespace = "") StudentAddDto student);
}
